package edu.ufl.cise.sanitas.client;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Mode extends Activity {

	private static final int RETURN_ID = 0;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.mode);
		
		Button sportButton = (Button) findViewById(R.id.mode_btn_sport);
		Button sleepButton = (Button) findViewById(R.id.mode_btn_sleep);
		
		sportButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
			}
			
		});
		
		sleepButton.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
			}
			
		});
		
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		super.onCreateOptionsMenu(menu);
		menu.add(0, RETURN_ID, 0, R.string.mode_menu_return);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case RETURN_ID:
			// TODO: put extra bundle
			
			Intent i = new Intent();
			setResult(RESULT_OK, i);
			finish();
			
			return true;
		}
		return super.onOptionsItemSelected(item);
	}

}
